#include "StdAfx.h"
#include <math.h>
#include "pgl/shape/PGLGeoCircle.h"

void CPGLGeoCircle::ReDraw()
{
	int deg=0;
	std::vector<double>* vx=new std::vector<double>;
	std::vector<double>* vy=new std::vector<double>;
	while(deg<360)
	{
		double x=m_center.x+abs(m_radius)*cos(deg/(2*PI));
		double y=m_center.y+abs(m_radius)*sin(deg/(2*PI));
		vx->push_back(x);
		vy->push_back(y);
		deg++;
	}
	SetDatas(*vx,*vy);
	delete vx;
	vx=0;
	delete vy;
	vy=0;
}